﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using TestClassExample.Test_PO;

namespace TestClassExample
{
    [TestFixture]
    public class Gmail
    {
        IWebDriver driver;

        [SetUp]
        public void SetUp()
        {
            driver = new FirefoxDriver();
            driver.Navigate().GoToUrl("https://www.gmail.com");
        }

        [Test]
        public void CheckUserNameText()
        {
            Assert.True(GmailPO.CheckUsername(driver).Displayed);
            Assert.AreEqual(GmailPO.CheckUsername(driver).Text, "UserName");
        }

        [Test]
        public void CheckUserNameInput()
        {
            Assert.True(GmailPO.CheckUserInput(driver).Enabled);
        }

        [TearDown]
        public void EndTest()
        {
            driver.Close();
            driver.Quit();
        }             
    }
}
